<?php
/**
* 用户银行卡模块Api Controller
*
* 用户银行卡模块Api Controller的注意及说明
* 以下use模块请不要互相伤害
*
* @author    xiecz <xiecz@yunys.com.cn>
* @copyright 2016 QuanZhouYunYiShang Inc.
*/
namespace App\Http\Controllers\Api\Statistics;

use Illuminate\Routing\Controller as BaseController;
use Response,Request;
use App\Services\Statistics\UserBankApi;

class UserBankController extends BaseController{
	function __construct(UserBankApi $bankApi){
		$this->bankApi	= $bankApi;
	}

	//银行卡绑定
	function userBankCardBinding(){
		$input	= Request::all();
		$result = $this->bankApi->userBankCardBinding($input);
		return response()->json($result);
	}

	//银行卡信息修改
	function updateBankCardInfo(){
		$input	= Request::all();
		$result = $this->bankApi->updateBankCardInfo($input);
		return response()->json($result);
	}
	/*
	//支付宝登陆授权
	function alipayAuth(){
		$input  = Request::all();
		$result = $this->bankApi->alipayAuth($input);
		return response()->json($result);
	}

	//支付宝账号绑定
	function userAlipayBinding(){
		$input  = Request::all();
		$result = $this->bankApi->userAlipayBinding($input);
		return response()->json($result);
	}
	*/

	//银行卡列表
	function user_bank_list(){
		$input  = Request::all();
		$result = $this->bankApi->user_bank_list($input);
		return response()->json($result);
	}

	//发送设置提现密码验证码
	function sms_set_password_to_withdraw(){
		$input  = Request::all();
		$input['type'] = 1;
		$result = $this->bankApi->sms_set_password_to_pay($input);
		return response()->json($result);
	}
	/*
	//设置提现密码
	function set_password(){
		$input  = Request::all();
		$result = $this->bankApi->set_password($input);
		return response()->json($result);
	}

	//重置提现密码
	function reset_password(){
		$input  = Request::all();
		$result = $this->bankApi->reset_password($input);
		return response()->json($result);
	}
	*/
	//忘记提现密码
	function set_password(){
		$input  = Request::all();
		$result = $this->bankApi->forget_password($input);
		return response()->json($result);
	}

	//绑定银行卡
	function new_bank_card(){
		$input  = Request::all();
		$input['type'] = 1;
		$result = $this->bankApi->new_bank_card($input);
		return response()->json($result);
	}

	//绑定银行卡
	function delete_bank_card(){
		$input  = Request::all();
		$input['type'] = 1;
		$result = $this->bankApi->delete_bank_card($input);
		return response()->json($result);
	}


	function test(){
		$input	= Request::all();
		$result	= $this->bankApi->test($input);
		return $result;
	}
}
